<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }
        .box {
            width: 900px;
            height: 800px;
            border: 1px solid red;
            display: flex;
            justify-content: space-around;


        }
        .box > div{
            width: 200px;
            height: 200px;
        }
        .first {
            /* 当子元素左右有空隙 可以使用flow-grow来扩展子元素宽度 默认为0*/
            /* 计算公式  子元素宽度增长 = 总空白宽度 * 自己的flex-grow/所有的子元素的flex-grow之和 */
            flex-grow: 1;
            background-color: red;  
        }
        .second {
            flex-grow: 1;
            background-color: yellow;
        }
        .third {
            flex-grow: 2;
            background-color: black;
        }
    </style>
</head>
<body>
    <div class="box">
    <div class="first"></div>
    <div class="second"></div>
    <div class="third"></div>
</div>
</body>
</html>